package com.mxpio.erp.common.technology.entity;

import java.math.BigDecimal;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.IdClass;
import javax.persistence.Table;

import com.mxpioframework.jpa.BaseEntity;
import com.mxpioframework.security.annotation.Dict;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

@Data
@EqualsAndHashCode(callSuper=false)
@Entity
@IdClass(value = ItemPropKey.class)
@Table(name = "MB_ERP_INVENTORY_ITEM_STORE_PROP")
@ApiModel(value="物料仓储属性")
public class ItemStoreProp extends BaseEntity {
	
	private static final long serialVersionUID = 1L;
	
	@Id
	@Column(name = "PROP_TYPE_")
	@ApiModelProperty(value = "属性类别")
	@Dict(dicCode = "ERP_TECH_PROP_TYPE")
	private String propType;
	
	@Id
	@Column(name = "CODE_")
	@ApiModelProperty(value = "物料/物料组编码")
	private String code;
	
	@Column(name = "ALLOW_WH_TYPE_")
	@ApiModelProperty(value = "允许仓库类别")
	@Dict(dicCode = "ERP_INV_WH_TYPE")
	private String allowWhType;
	
	@Column(name = "BATCH_CONTROL_")
	@ApiModelProperty(value = "是否批次控制")
	@Dict(dicCode = "ERP_COMMON_YESNO")
	private String batchControl;
	
	@Column(name = "LOCATION_CONTROL_")
	@ApiModelProperty(value = "是否库位控制")
	@Dict(dicCode = "ERP_COMMON_YESNO")
	private String locationControl;
	
	@Column(name = "VIRTUAL_PART_")
	@ApiModelProperty(value = "是否虚拟件")
	@Dict(dicCode = "ERP_COMMON_YESNO")
	private String virtualPart;
	
	@Column(name = "SAFE_STOCK_")
	@ApiModelProperty(value = "安全库存")
	private BigDecimal safeStock;
}
